package com.authine.cloudpivot.engine.repository;

import com.authine.cloudpivot.engine.domain.organization.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: zyj
 * @time: 2021/6/17 17:47
 */
public interface SubjectRepository extends BaseRepository<User, Serializable>  {

    @Query(nativeQuery = true, value = "select id from iden7_XMQD where projectNo = :code")
    Map<String, String> getIdByCode(@Param(value = "code") String code);

    @Query(nativeQuery = true, value = "select * from iden7_XMKXX where projectNo = :code")
    Map<String, String> getKXXIdByCode(@Param(value = "code") String code);
}
